package day912;
import java.util.ArrayList;
//day912.A1
public class A1 {
    public static void main(String[] args) {
        ArrayList<String>   list=new ArrayList();
        //规定元素类型必须是String
        list.add("小王锐卓");//1.
        list.add("小张三");
        list.add("小李三");
        list.add("小陈");
        list.add(0, "小赵丽颖");//2.
        int len=list.size();//3.
        list.set(0,"小赵高");//4.
        System.out.println(list);

        String ele1=list.get(0);//5.
        String eleZG=list.remove(0);//6.
        boolean rs=list.remove("小赵高");//7.

        Object[] objs=list.toArray();//8.集合的 toArray()
        String[] objs2=list.toArray( new String[1] ); //数组参数：指定数组元素类型
        list.clear();
    }   //集合对象.clear();
}